#pragma once
#include "stdafx.h"
#include "StreamPage.h"
#include "Types.h"
#include "BufferConstraint.h"
#include <boost/shared_ptr.hpp>
#include "Element.h"
#include "AbstractBuffer.h"
class ElementIterator;
class RelationBuffer:public AbstractBuffer
{
private:
	
	std::map<DocumentId, MemoryPosition>idPositionMap;
	MemoryPosition freePositionHead;

public:
	RelationBuffer(void);
	~RelationBuffer(void);
	void insertElement(Element& element);
	void deleteElement(Element& element);
	bool isFull(void);
  //  void getAllElements(std::list<Element>&elementList);
	friend class ElementIterator;
};
